<?php

namespace app\admin\validate\setting;

use tmcore\base\BaseValidate;

/**
 * 网站设置验证器
 */
class WebSetValidate extends BaseValidate
{
    protected $rule = [
        'name' => 'require|max:30',
        'logo' => 'require',
    ];

    protected $message = [
        'name.require' => '请填写网站名称',
        'name.max' => '网站名称最长为12个字符',
        'logo.require' => '请上传网站logo',
    ];

    /**
     * 设置存储引擎参数场景
     * @return WebSetValidate
     */
    public function sceneEdit()
    {
        return $this->only(['name', 'logo']);
    }
}